/*
	TODO
	如果中途断开SIM卡,ppp连接不会消失,这个时候需要上层在kill pppd 即可
*/




#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <linux/if.h>
#include <errno.h>
#include <fcntl.h> 
#include <termios.h> 
#include <pthread.h>

#define CMD_CHECK_CONNECT   "AT"
#define CMD_ATE_OPEN        "ATE1"
#define CMD_ATE_CLOSE       "ATE0"
#define CMD_CMD_REP         "A/"
#define CMD_VOLT_REQUEST    "AT+CBC"
#define CMD_SIM_EXIST       "AT+CPIN?"
#define CMD_SIM_TYPE        "AT+COPS?"
#define CMD_SIM_SIG_STREN   "AT+CSQ"
#define CMD_SIM_TEL_NUM     "AT+CNUM"
#define CMD_SIM_MANF        "AT+CGMM"
#define CMD_SIM_MODULE      "ATI"
#define CMD_SIM_FIRM        "AT+GMR"
#define CMD_SIM_SERI        "AT+CGSN"
#define CMD_TELEPHONE_OFF   "ATH"
#define CMD_TELEPHONE_ON    "ATA"
#define CMD_ATCVHU          "AT+CVHU=0"
#define CMD_MSG_TMODE       "AT+CMGF=1"
#define CMD_MSG_CODEGSM     "AT+CSCS=\"GSM\""
#define CMD_MSG_REC_UNREAD  "AT+CMGL=\"REC UNREAD\""
#define CMD_MSG             "AT+CMGS="
#define CMD_MSG_READ        "AT+CMGR="
#define CMD_NET_STAT        "AT+CREG?"
